Delete Record

Description

Deletes a record in a component that has been bound to one or more tables.

Discussion

The Delete Record button adds the ability to delete a record from a data bound UX component. The button can be placed on the UX component by selecting it from the list of pre-defined control in the Defined Controls section of the UX Builder.

The Delete Record button has a client-side Enable expression that will disable the control if the current record is a new record.

images/deleteRecord.png

This control can only be used if you have loaded primary keys for the primary table. You can load primary keys using the 'Load Primary keys for Parent Table' server-side action in the onDialogInitialize event, or in an Ajax callback, using the 'Get Primary Key values for Records in a Query' Action Javascript.

The button calls the {dialog.object}.deleteRecord() JavaScript method when clicked. You can customize this action by passing additional parameters to the deleteRecord() method. For example, you could specify that the component should display a new record after deleting the current record:

var deleteOptions = { nextRecordToShow : 'newrecord' };

{dialog.object}.deleteRecord(deleteOptions);

Or, you could suppress the confirmation message:

var deleteOptions = { confirmation : false };

{dialog.object}.deleteRecord(deleteOptions)

See {dialog.object}.deleteRecord() for more information about available parameters.

Videos

Deleting a Record in a Data Bound Component

In a UX component that has been bound to one or more tables, you can delete a record from the primary table to which the UX component has been bound using the Delete Record button.

Limitations

Data bound UX Component Only

See Also